#include "..\Server\Server.h"

int main()
{
	Server s;
	Server cs;
	Client c;	
	c.river()->connect("127.0.0.1", 9999);
	cs.river(c.river());
	cs.requested(s.requested());
	c.threadobject(c.river(), &c, &cs);
	c.start();
	cs.start();
	s.upstream(&c);
	s.listen(9998);
	s.numthreads(10);
	s.start();
	for (;;)
	{
		Client * new_client = new Client();
		s.accept(new_client);
		new_client->threadobject(new_client->river(), new_client, &s);
		new_client->start();
	}
}